package com.mak.menoy.util;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;

public class VersionInfo {
	
	public  static String getCurrentVersion(Context context){
		PackageManager pm = context.getPackageManager();
		PackageInfo packageInfo=null;
		 String mCurrentVersion ="";
		try {
			packageInfo = pm.getPackageInfo( context.getPackageName(), 0);
		} catch (NameNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		  mCurrentVersion = packageInfo.versionName;
		  
		  return mCurrentVersion;
	}
	
	  

}
